package app.Insam.VNC;

import android.app.Notification;
import android.app.PendingIntent;
import android.content.Intent;

public class InsamNotificationManager {
	public static final String TAG = "InsamNotificationManager";

	public static final int NOTI_DEBUG=0;
	public static final int NOTI_OFFICE=1;
	public static final int NOTI_OTHERS=2;
	
	protected InsamService mParent;
//	protected NotificationManager mNotiManager;
	protected Notification mNotiOffice;
	
	public InsamNotificationManager(InsamService _Parent) {
		mParent = _Parent;
//		mNotiManager = (NotificationManager)mParent.getSystemService(Context.NOTIFICATION_SERVICE);	
		
		Intent intent = new Intent(mParent, InsamMain.class);
		intent.setAction(Intent.ACTION_MAIN);
		intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);	
		intent.addCategory(Intent.CATEGORY_LAUNCHER);
		PendingIntent mContent = PendingIntent.getActivity(mParent, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);	
		
		mNotiOffice = new Notification(R.drawable.stat_sami, "In Office", 0);
		mNotiOffice.flags |= Notification.FLAG_ONGOING_EVENT;
		mNotiOffice.vibrate = new long[] {120,80,120,80};
		mNotiOffice.setLatestEventInfo(mParent, "Insam VNC", "You are in Office", mContent);		
	}
	
	public Notification getNotiOffice() {
//		mNotiOffice.when = System.currentTimeMillis();
		return mNotiOffice;
	}
	
/*	public void notify(int _id, String _text) {
		Log.d(TAG, "notify, id:"+_id);
//		mNotiManager.notify(NOTI_OFFICE, mNoti);
	}
	
	public void cancel(int _id) {
		Log.d(TAG, "notify cancel, id:"+_id);
		mNotiManager.cancel(_id);
	}
*/
}
